﻿using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using DevExpress.XtraTab;
using DiaoPaiDaYin;
using DXApplicationTangche.DTO;
using DXApplicationTangche.service;
using DXApplicationTangche.UC;
using DXApplicationTangche.UC.dataTable;
using DXApplicationTangche.UC.Luna;
using DXApplicationTangche.UC.下单MTO;
using DXApplicationTangche.UC.全部工序.面辅料.辅料相关;
using DXApplicationTangche.UC.固定资产;
using DXApplicationTangche.UC.坚山上海.坚山上海新;
using DXApplicationTangche.UC.套号管理;
using DXApplicationTangche.UC.客户CRM.高德;
using DXApplicationTangche.UC.工序管理;
using DXApplicationTangche.UC.工序管理.工序门户;
using DXApplicationTangche.UC.库存;
using DXApplicationTangche.UC.成品出库单;
using DXApplicationTangche.UC.抖音出入库;
using DXApplicationTangche.UC.抖音出入库.抖音UC;
using DXApplicationTangche.UC.抖音出入库.抖音下单;
using DXApplicationTangche.UC.抖音出入库.抖音订单;
using DXApplicationTangche.UC.报表;
using DXApplicationTangche.UC.报表.service;
using DXApplicationTangche.UC.有赞.有赞商品;
using DXApplicationTangche.UC.查询;
using DXApplicationTangche.UC.标签打印;
using DXApplicationTangche.UC.样品管理;
using DXApplicationTangche.UC.款式尺寸;
using DXApplicationTangche.UC.款式异常;
using DXApplicationTangche.UC.款式管理;
using DXApplicationTangche.UC.款式选择;
using DXApplicationTangche.UC.流程;
using DXApplicationTangche.UC.物料管理;
using DXApplicationTangche.UC.生产下单;
using DXApplicationTangche.UC.生产计划.生产批生产;
using DXApplicationTangche.UC.生产计划.生产计划;
using DXApplicationTangche.UC.生产计划.编排生产批;
using DXApplicationTangche.UC.盘点;
using DXApplicationTangche.UC.纳可;
using DXApplicationTangche.UC.纳客;
using DXApplicationTangche.UC.订单;
using DXApplicationTangche.UC.订单一览新;
using DXApplicationTangche.UC.订单一览新.PDFViewer;
using DXApplicationTangche.UC.订单一览新.客户充值;
using DXApplicationTangche.UC.订单一览新.改版;
using DXApplicationTangche.UC.订单一览新.订单预览新;
using DXApplicationTangche.UC.订单一览新.辅料;
using DXApplicationTangche.UC.订单一览新.辅料.辅料下单;
using DXApplicationTangche.UC.订单一览新.辅料.辅料管理;
using DXApplicationTangche.UC.订单一览新.辅料.辅料重构;
using DXApplicationTangche.UC.订单一览新.销售确认单;
using DXApplicationTangche.UC.订单异常;
using DXApplicationTangche.UC.货号管理;
using DXApplicationTangche.UC.货号管理.成衣异常;
using DXApplicationTangche.UC.货号管理.销售款式;
using DXApplicationTangche.UC.辅料;
using DXApplicationTangche.UC.金蝶;
using DXApplicationTangche.UC.销售台账;
using DXApplicationTangche.UC.销售管理;
using DXApplicationTangche.UC.门店下单.form;
using DXApplicationTangche.UC.门店下单.form.工厂订单一览;
using DXApplicationTangche.UC.门店下单.form.订单修改;
using DXApplicationTangche.UC.门店下单.下单;
using DXApplicationTangche.UC.门店出入库;
using DXApplicationTangche.UC.门店出入库.淘宝;
using DXApplicationTangche.UC.面料审核;
using DXApplicationTangche.UC.面料审核.Service;
using DXApplicationTangche.UC.面料库存;
using DXApplicationTangche.UC.面料库存.入库;
using DXApplicationTangche.UC.项目成果管理;
using DXApplicationTangche.UC.项目成果管理.在制品管理;
using DXApplicationTangche.UC.项目流程;
using DXApplicationTangche.原型;
using mendian;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using 坚山面料维护;
using static DXApplicationTangche.UC.门店下单.form.Frm订单一览;

namespace DXApplicationTangche
{
    public partial class FluentMainFrame : DevExpress.XtraBars.FluentDesignSystem.FluentDesignForm
    {
        private String userRightShop { get; set; }
        public enum Enum实体店铺 { 门店, 工厂, 坚山, Luna, 坚山上海 };//实体店铺
        public FluentMainFrame()
        {
            InitializeComponent();
            this.initPanel(new Form订单一览新());
        }
        public FluentMainFrame(Enum实体店铺 @enum)
        {
            InitializeComponent();
            switch (@enum)
            {
                case Enum实体店铺.门店:
                    this.accordionControlElement上海坚山.Visible = false;//上海坚山
                    this.accordionControlElement坚山.Visible = false;//坚山
                    this.accordionControlElement工序管理.Visible = false;//工序管理
                    this.accordionControlElement固定资产.Visible = false;//固定资产
                    this.accordionControlElement辅料管理.Visible = false;//辅料管理
                    this.accordionControlElement项目管理.Visible = false;//货号管理
                    this.accordionControlElement流程.Visible = false;//流程
                    Form订单一览新 form1 = new Form订单一览新();
                    form1.addTabDataEvents += this.addTab;
                    this.initPanel(form1);
                    this.Tab辅料一览和样衣登记一览();//辅料内容显示
                    break;
                case Enum实体店铺.工厂:
                    Form订单一览新 form2 = new Form订单一览新();
                    form2.addTabDataEvents += this.addTab;
                    this.initPanel(form2);
                    this.Tab辅料一览和样衣登记一览();//辅料内容显示
                    break;
                case Enum实体店铺.坚山:
                    break;
                case Enum实体店铺.Luna:
                    break;
                case Enum实体店铺.坚山上海:
                    this.accordionControlElement上海坚山.Expanded = true;//上海坚山展开
                    this.accordionControlElement坚山.Visible = false;//坚山
                    this.accordionControlElement客户关系管理.Visible = false;//客户关系管理
                    this.accordionControlElement门店管理.Visible = false;//门店管理
                    this.accordionControlElement订单管理.Visible = false;//订单一览
                    this.accordionControlElement样品管理.Visible = false;//样品管理
                    this.accordionControlElement物料管理.Visible = false;//物料管理
                    this.accordionControlElement款式管理.Visible = false;//款式管理
                    this.accordionControlElement面料管理.Visible = false;//面料管理
                    this.accordionControlElement工序管理.Visible = false;//工序管理
                    this.accordionControlElement生产计划.Visible = false;//生产计划
                    this.accordionControlElementLuna.Visible = false;//Luna
                    this.accordionControlElement7销售日记账.Visible = false;//销售日记账
                    this.accordionControlElement标签打印.Visible = false;//标签打印
                    this.accordionControlElement固定资产.Visible = false;//固定资产
                    this.accordionControlElement辅料管理.Visible = false;//辅料管理
                    this.xtraTabPageCustomer.PageVisible = false;//客户tab页隐藏
                    this.xtraTabPageSubMaterial.PageVisible = false;//辅料tab页隐藏
                    this.accordionControlElement项目管理.Visible = false;//货号管理
                    this.accordionControlElement流程.Visible = false;//流程
                    this.accordionControlElemen抖音.Visible = false;
                    this.accordionControlElement物料需求计划.Visible = false;
                    this.accordionControlElement有赞.Visible = false;
                    this.accordionControlElement库存.Visible = false;
                    this.Text = "坚山上海门店下单";
                    this.initPanel(new Form坚山上海订单创建());
                    break;
                default:
                    break;
            }
            
        }
        /// <summary>
        /// 坚山，区分登录门店   Luna
        /// </summary>
        /// <param name="enum"></param>
        /// <param name="userRightShop"></param>
        public FluentMainFrame(Enum实体店铺 @enum,String userRightShop)
        {
            InitializeComponent();
            switch (@enum)
            {
                case Enum实体店铺.门店:
                    break;
                case Enum实体店铺.工厂:
                    break;
                case Enum实体店铺.坚山:
                    this.accordionControlElement坚山.Expanded = true;//坚山展开
                    this.accordionControlElement上海坚山.Visible = false;//上海坚山
                    this.accordionControlElement客户关系管理.Visible = false;//客户关系管理
                    this.accordionControlElement门店管理.Visible = false;//门店管理
                    this.accordionControlElement订单管理.Visible = false;//订单一览
                    this.accordionControlElement样品管理.Visible = false;//样品管理
                    this.accordionControlElement物料管理.Visible = false;//物料管理
                    this.accordionControlElement款式管理.Visible = false;//款式管理
                    this.accordionControlElement面料管理.Visible = false;//面料管理
                    this.accordionControlElement工序管理.Visible = false;//工序管理
                    this.accordionControlElement生产计划.Visible = false;//生产计划
                    this.accordionControlElementLuna.Visible = false;//Luna
                    this.accordionControlElement7销售日记账.Visible = false;//销售日记账
                    this.accordionControlElement标签打印.Visible = false;//标签打印
                    this.accordionControlElement固定资产.Visible = false;//固定资产
                    this.accordionControlElement辅料管理.Visible = false;//辅料管理
                    this.xtraTabPageCustomer.PageVisible = false;//客户tab页隐藏
                    this.xtraTabPageSubMaterial.PageVisible = false;//辅料tab页隐藏
                    this.accordionControlElement项目管理.Visible = false;//货号管理
                    this.accordionControlElement流程.Visible = false;//流程
                    this.accordionControlElemen抖音.Visible = false;
                    this.accordionControlElement物料需求计划.Visible = false;
                    this.accordionControlElement有赞.Visible = false;
                    this.accordionControlElement库存.Visible = false;
                    this.Text = "坚山门店下单";
                    this.userRightShop = userRightShop;
                    this.initPanel(new Frm坚山订单创建(userRightShop));
                    break;
                case Enum实体店铺.Luna:
                    this.accordionControlElementLuna.Expanded = true;//luna展开
                    this.accordionControlElement坚山.Visible = false;//坚山
                    this.accordionControlElement上海坚山.Visible = false;//上海坚山
                    this.accordionControlElement客户关系管理.Visible = false;//客户关系管理
                    this.accordionControlElement门店管理.Visible = false;//门店管理
                    this.accordionControlElement订单管理.Visible = false;//订单一览
                    this.accordionControlElement样品管理.Visible = false;//样品管理
                    this.accordionControlElement物料管理.Visible = false;//物料管理
                    this.accordionControlElement款式管理.Visible = false;//款式管理
                    this.accordionControlElement面料管理.Visible = false;//面料管理
                    this.accordionControlElement工序管理.Visible = false;//工序管理
                    this.accordionControlElement生产计划.Visible = false;//生产计划
                    this.accordionControlElement7销售日记账.Visible = false;//销售日记账
                    this.accordionControlElement标签打印.Visible = false;//标签打印
                    this.accordionControlElement固定资产.Visible = false;//固定资产
                    this.accordionControlElement辅料管理.Visible = false;//辅料管理
                    this.xtraTabPageCustomer.PageVisible = false;//客户tab页隐藏
                    this.xtraTabPageSubMaterial.PageVisible = false;//辅料tab页隐藏
                    this.accordionControlElement项目管理.Visible = false;//货号管理
                    this.accordionControlElement流程.Visible = false;//流程
                    this.accordionControlElemen抖音.Visible = false;
                    this.accordionControlElement物料需求计划.Visible = false;
                    this.accordionControlElement有赞.Visible = false;
                    this.accordionControlElement库存.Visible = false;
                    this.Text = "Luna&春衫" + "   登陆用户：" + userRightShop;
                    this.initPanel(new FrmLuna门户());
                    break;
                case Enum实体店铺.坚山上海:
                    break;
                default:
                    break;
            }
        }

        public FluentMainFrame build吊牌和出库()
        {
            this.accordionControlElement库存.Visible = true;
            this.accordionControlElement生产计划.Expanded = true;
            this.accordionControlElement标签打印.Expanded = true;
            this.accordionControlElement客户关系管理.Visible = false;
            this.accordionControlElement门店管理.Visible = false;
            this.accordionControlElement订单管理.Visible = false;
            this.accordionControlElement样品管理.Visible = false;
            this.accordionControlElement坚山.Visible = false;
            this.accordionControlElement物料管理.Visible = false;
            this.accordionControlElement款式管理.Visible = false;
            this.accordionControlElement面料管理.Visible = false;
            this.accordionControlElement工序管理.Visible = false;
            this.accordionControlElement已开立.Visible = false;
            this.accordionControlElement已排产.Visible = false;
            this.accordionControlElement已投产.Visible = false;
            this.accordionControlElement78.Visible = false;
            this.accordionControlElement改版.Visible = false;
            this.accordionControlElement整烫后检查.Visible = false;
            this.accordionControlElementLuna.Visible = false;
            this.accordionControlElement7销售日记账.Visible = false;
            this.accordionControlElement水洗标.Visible = false;
            this.accordionControlElement套号水洗标.Visible = false;
            this.accordionControlElement裁剪贴.Visible = false;
            this.accordionControlElement包装码.Visible = false;
            this.accordionControlElement订单贴.Visible = false;
            this.accordionControlElement发货贴.Visible = false;
            this.accordionControlElement固定资产.Visible = false;
            this.accordionControlElement辅料管理.Visible = false;
            this.accordionControlElement上海坚山.Visible = false;
            this.accordionControlElement项目管理.Visible = false;
            this.accordionControlElement流程.Visible = false;
            this.Text = "吊牌打印、入库和出库";
            this.initPanel(new Form吊牌新());
            return this;
        }
        /// <summary>
        /// 页面显示的tab页：查询辅料全部一览
        /// </summary>
        private void Tab辅料一览和样衣登记一览()
        {
            // 辅料一览
            XtraUserControl辅料查询 XtraUserControl辅料查询 = new XtraUserControl辅料查询();
            this.xtraTabPageSubMaterial.Controls.Clear();
            //指示窗体显示是否为顶级窗口
            this.xtraTabPageSubMaterial.Controls.Add(XtraUserControl辅料查询);
            XtraUserControl辅料查询.Dock = System.Windows.Forms.DockStyle.Fill;
            XtraUserControl辅料查询.Show();

            // 样衣登记一览
            XtraUserControl样衣登记一览 XtraUserControl样衣登记一览 = new XtraUserControl样衣登记一览();
            this.xtraTabPageSampleSale.Controls.Clear();
            this.xtraTabPageSampleSale.Controls.Add(XtraUserControl样衣登记一览);
            XtraUserControl样衣登记一览.Dock = System.Windows.Forms.DockStyle.Fill;
            XtraUserControl样衣登记一览.Show();

            // 最新登记货号
            XtraUserControl样衣最新货号 XtraUserControl样衣最新货号 = new XtraUserControl样衣最新货号();
            this.xtraTabPageLatestSample.Controls.Clear();
            this.xtraTabPageLatestSample.Controls.Add(XtraUserControl样衣最新货号);
            XtraUserControl样衣最新货号.Dock = System.Windows.Forms.DockStyle.Fill;
            XtraUserControl样衣最新货号.Show();

            // 审版
            XtraUserControl审版 XtraUserControl审版 = new XtraUserControl审版();
            this.xtraTabPage审版.Controls.Clear();
            this.xtraTabPage审版.Controls.Add(XtraUserControl审版);
            XtraUserControl审版.Dock = System.Windows.Forms.DockStyle.Fill;
            XtraUserControl审版.Show();

            // 裁剪
            XtraUserControl裁剪 XtraUserControl裁剪 = new XtraUserControl裁剪();
            this.xtraTabPage裁剪.Controls.Clear();
            this.xtraTabPage裁剪.Controls.Add(XtraUserControl裁剪);
            XtraUserControl裁剪.Dock = System.Windows.Forms.DockStyle.Fill;
            XtraUserControl裁剪.Show();

            //进入Form保存抖音excel模板
            byte[] buffer = Properties.Resources.抖音出库单;//获取嵌入dll文件的字节数组  
            string strPath = Application.StartupPath + @"\tag\" + "抖音出库单.xlsx";//设置释放路径   导出路径
                                                                               //创建dll文件（覆盖模式）  
            using (FileStream fs = new FileStream(strPath, FileMode.Create))
            {
                fs.Write(buffer, 0, buffer.Length);
                fs.Close();
            }

            //进入Form保存生产计划视图excel模板
            byte[] bufferMrp = Properties.Resources.生产计划视图;//获取嵌入dll文件的字节数组  
            string strPathMrp = Application.StartupPath + @"\tag\" + "生产计划视图.xlsx";//设置释放路径   导出路径
                                                                               //创建dll文件（覆盖模式）  
            using (FileStream fs = new FileStream(strPathMrp, FileMode.Create))
            {
                fs.Write(bufferMrp, 0, bufferMrp.Length);
                fs.Close();
            }

            //进入Form保存进出库明细excel模板
            byte[] bufferInout = Properties.Resources.进出库明细;//获取嵌入dll文件的字节数组  
            string strPathInout = Application.StartupPath + @"\tag\" + "进出库明细.xlsx";//设置释放路径   导出路径
                                                                                   //创建dll文件（覆盖模式）  
            using (FileStream fs = new FileStream(strPathInout, FileMode.Create))
            {
                fs.Write(bufferInout, 0, bufferInout.Length);
            }

            //进入Form保存坚山明细excel模板
            byte[] bufferKashiyamaXML = Properties.Resources.进出库明细;//获取嵌入dll文件的字节数组  
            string strPathKashiyamaXML = Application.StartupPath + @"\tag\" + "进出库明细.xlsx";//设置释放路径   导出路径
                                                                                    //创建dll文件（覆盖模式）  
            using (FileStream fs = new FileStream(strPathKashiyamaXML, FileMode.Create))
            {
                fs.Write(bufferKashiyamaXML, 0, bufferKashiyamaXML.Length);
            }
        }
        
        /// <summary>
        /// 初始化导航
        /// </summary>
        /// <param name="uC"></param>
        private void initNavigationPage(XtraUserControl uC)
        {
            uC.Dock = DockStyle.Fill;
            this.navigationPage库存.Controls.Clear();
            this.navigationPage库存.Controls.Add(uC);
            this.navigationFrame.Pages[0].Show();
        }

        /// <summary>
        /// 初始化panel
        /// </summary>
        /// <param name="frm"></param>
        private void initPanel(Form frm)
        {
            this.xtraTabPageMain.Controls.Clear();
            //指示窗体显示是否为顶级窗口
            frm.TopLevel = false;
            this.xtraTabPageMain.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock = System.Windows.Forms.DockStyle.Fill;
            frm.Show();
        }

        private void FluentMainFrame_Load(object sender, EventArgs e)
        {
            this.splashScreenManager.ShowWaitForm();
            this.splashScreenManager.SetWaitFormCaption("请稍后,正在加载中....");     // 标题
            this.splashScreenManager.SetWaitFormDescription("正在初始化.....");     // 信息
            ResourceService.synPictureResouces();   //  资源同步
            //this.initPanel(new Form订单一览新());
            this.splashScreenManager.CloseWaitForm();
        }

        private void accordionControlElement34_Click(object sender, EventArgs e)
        {
            Form订单一览新 form = new Form订单一览新();
            form.addTabDataEvents += this.addTab;
            this.initPanel(form);
        }
        private void addTab(Form form)
        {
            XtraTabPage newTabPage = new XtraTabPage();
            newTabPage.Name = "详情";//设置新TabPage的Name
            newTabPage.Text = "详情";//设置新TabPage的标题文本
            form.TopLevel = false;
            xtraTabControl主页面.TabPages.Add(newTabPage);//添加
            xtraTabControl主页面.SelectedTabPage = newTabPage;//设置为选中
            newTabPage.Controls.Add(form);
            form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            form.Dock = System.Windows.Forms.DockStyle.Fill;
            form.Show();
        }
        
        private void accordionControlElement49_Click(object sender, EventArgs e)
        {
            this.initPanel(new Frm坚山订单创建(this.userRightShop));
        }

        private void accordionControlElement50_Click(object sender, EventArgs e)
        {
            this.initPanel(new Frm坚山订单一览(Enum订单类别.坚山订单));
        }

        private void accordionControlElement52_Click(object sender, EventArgs e)
        {
            this.initPanel(new Frm坚山订单一览(Enum订单类别.坚山美国订单));
            //this.initPanel(new Form订单一览新(Enum订单类别.坚山美国订单));
        }

        private void accordionControlElement53_Click(object sender, EventArgs e)
        {
            this.initPanel(new XtraFormEXCEL());
        }

        private void accordionControlElement56_Click(object sender, EventArgs e)
        {
            this.initPanel(new Frm款式类别维护());
        }

        private void accordionControlElement58_Click(object sender, EventArgs e)
        {
            this.initPanel(new Frm款式());
        }

        private void accordionControlElement64_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Frm面料一览());
            this.initPanel(new Form进销存门户());
        }

        private void accordionControlElement67_Click(object sender, EventArgs e)
        {
            this.initPanel(new Frm款式维护记录一览());
        }

        private void accordionControlElement68_Click_1(object sender, EventArgs e)
        {
            this.initPanel(new Form销售门户());
        }

        private void accordionControlElement69_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form样品门户());
        }

        private void accordionControlElement套号管理_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form套号门户());
        }

        private void accordionControlElement72_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form项目成果物管理());
        }

        private void accordionControlElement订单异常看板_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form订单异常看板());
        }

        private void accordionControlElement76_Click(object sender, EventArgs e)
        {
            this.initPanel(new FrmLuna门户());
        }

        private void accordionControlElement已排产_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form已排产("01.0001"));
            this.initPanel(new Form已排产("00.0003.0001"));
        }

        private void accordionControlElement已开立_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form已开立());
        }
        
        private void accordionControlElement已投产_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form已投产("01.0001"));
        }
        
        private void accordionControlElement销售日记账_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form销售台账());
            this.initPanel(new Form生产下单订单门户());
        }

        private void accordionControlElement水洗标_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form水洗标());
        }

        private void accordionControlElement裁剪贴_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form裁剪贴());
        }

        private void accordionControlElement吊牌_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form吊牌());
            this.initPanel(new Form吊牌新());
        }

        private void accordionControlElement包装码_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form包装码());
        }

        private void accordionControlElement待确认_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form待确认一览());
            this.initPanel(new Form待补充定制一览());
        }

        private void accordionControlElement78_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form已完成一览());
        }

        private void accordionControlElement订单贴_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form订单贴());
        }
        private void accordionControlElement发货贴_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form发货贴());
            this.initPanel(new Form发货贴带详情());
        }

        private void accordionControlElement固定资产一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form固定资产一览());
        }

        private void accordionControlElement套号水洗标_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form套号水洗标());
        }

        private void accordionControlElement80_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form成品出库单());
        }

        private void accordionControlElement改版_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form改版一览());
        }

        private void accordionControlElement辅料维护_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form辅料一览());
        }

        private void accordionControlElement淘宝出库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form淘宝出库());
        }

        private void accordionControlElement淘宝发运_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form淘宝发运());
        }

        private void accordionControlElement上海坚山订单创建_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form坚山上海订单创建());
            //this.initPanel(new Form订单一览新(Enum订单类别.坚山上海订单));
        }

        private void accordionControlElement上海坚山订单一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Frm坚山订单一览(Enum订单类别.坚山上海订单));
        }

        private void xtraTabControl主页面_CloseButtonClick_1(object sender, EventArgs e)
        {
            DevExpress.XtraTab.ViewInfo.ClosePageButtonEventArgs EArg = (DevExpress.XtraTab.ViewInfo.ClosePageButtonEventArgs)e;
            string name = EArg.Page.Text;//得到关闭的选项卡的text
            foreach (XtraTabPage page in this.xtraTabControl主页面.TabPages)//遍历得到和关闭的选项卡一样的Text
            {
                if (page.Text == name)
                {
                    if (page.Text.Equals("主页面") 
                        || page.Text.Equals("辅料查询") 
                        || page.Text.Equals("客户查询") 
                        || page.Text.Equals("样衣登记一览") 
                        || page.Text.Equals("最新登记货号")
                        || page.Text.Equals("审版")
                        || page.Text.Equals("裁剪")
                        )
                    {
                        return;
                    }
                    this.xtraTabControl主页面.TabPages.Remove(page);
                    page.Dispose();
                    return;
                }
            }
        }

        private void accordionControlElement门店出入库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form门店出入库());
        }

        private void accordionControlElement整烫后检查_Click(object sender, EventArgs e)
        {
            this.initPanel(new FormVI质检("02"));
        }

        private void accordionControlElement成衣异常_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form成衣异常一览()); 
        }
        private void accordionControlElement未完成一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form未完成项目一览());
        }
        
        private void accordionControlElement返修订单一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form返修订单一览("18"));
        }

        private void accordionControlElement库存查询_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form库存查询());
        }

        private void accordionControlElement销售订单一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new FormMTO团体套号下单());
        }

        private void accordionControlElement定制销售暂存_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form销售确认下单());
        }

        private void accordionControlElement销售确认单_Click(object sender, EventArgs e)
        {
            this.initPanel(new FormMTO销售一览());
        }

        private void accordionControlElement客套条码查询生产订单_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form条码查询());
        }

        private void accordionControlElement客户套号查询_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form客户套号查询());
        }

        private void accordionControlElement客户一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form客户一览带标签());
        }

        private void accordionControlElement销售日记账每日预览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form销售日记账每日预览());
        }

        private void accordionControlElement五一客户充值_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form客户充值());
            this.initPanel(new Form会员预存());
        }

        private void accordionControlElement入库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form入库());
        }

        private void accordionControlElement出库贴_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form库存质检贴());
        }

        private void accordionControlElement返修接收_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form返修接收());
        }

        private void accordionControlElement库存界面_Click(object sender, EventArgs e)
        {
            new Form库存界面().ShowDialog();
        }

        private void accordionControlElement销售日记账视图一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form销售日记账视图一览());
        }

        private void accordionControlElement其他出入库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form其他出入库());
        }
        private void accordionControlElement销售日结账单_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form销售日结账单());
        }

        private void accordionControlElement其他返厂确认_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form其他返厂确认());
        }

        private void accordionControlElement销售统计_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form销售统计());
        }

        private void accordionControlElement裁剪后接收_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form辅料工序(new WBSItemDTO("13", "12", "裁剪后接收", "01.0001", "ASSETES-20201010-000004"))); 
        }

        private void accordionControlElement未排产工序一览_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form面料待处理());
        }

        private void accordionControlElement物料需求计划一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form物料需求计划());
        }

        private void accordionControlElement面料审核出库一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form面料审核出库一览());
        }

        private void accordionControlElement待审版一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form待审版一览());
        }

        private void accordionControlElement抖音出库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音出库());
        }

        private void accordionControlElement钉钉退货入库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音退货入库());
        }

        private void accordionControlElement抖音订单比对出库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音订单比对出库());
        }

        private void accordionControlElement抖音出库一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音出库一览());
        }

        private void accordionControlElement抖音款式创建_Click(object sender, EventArgs e)
        {
            //this.initPanel(new Form抖音款式添加());
            new Form抖音款式添加().ShowDialog();
        }

        private void accordionControlElement受托加工地址一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form受托加工地址一览());
        }

        private void accordionControlElement未排产工序一览_Click_1(object sender, EventArgs e)
        {
            List<String> shopIds = new List<string>();
            shopIds.Add("18");
            shopIds.Add("48");
            shopIds.Add("50");
            shopIds.Add("46");
            shopIds.Add("49");
            shopIds.Add("52");
            shopIds.Add("51");
            this.initPanel(new Form面料待处理(shopIds));
        }

        private void accordionControlElement受托加工方一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form受托加工方一览());
        }

        private void accordionControlElement上传打印模板_Click(object sender, EventArgs e)
        {

        }

        private void accordionControlElement面料成份_Click(object sender, EventArgs e)
        {
            FabricCompositionDTO fabricCompositionDTO = new FabricCompositionDTO();
            this.initPanel(new Form保存面料成份(fabricCompositionDTO));
        }

        private void accordionControlElement坚山面料库存_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form坚山面料库存());
        }

        private void accordionControlElement坚山面料库存1_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form坚山面料库存());
        }

        private void accordionControlElement上海坚山面料库存_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form坚山面料库存());
        }

        private void accordionControlElement外购水洗标_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form外购水洗标());
        }

        private void accordionControlElement生产计划单产成品_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form生产计划单产成品());
            //new Form生产计划单产成品().ShowDialog();
        }

        private void accordionControlElement生产计划单出库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form生产计划单入库());
        }

        private void accordionControlElement抖音sku一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音sku一览());
        }

        private void accordionControlElement抖音订单一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音订单一览());
        }

        private void accordionControlElement抖音订单追溯_Click(object sender, EventArgs e)
        {
        }

        private void accordionControlElement抖音订单备货管理_Click(object sender, EventArgs e)
        {
            new Form抖音销售及备货统计().ShowDialog();
        }

        private void accordionControlElement抖音订单下达收款单_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音金蝶单据查询());
        }

        private void accordionControlElementIPQC_Click(object sender, EventArgs e)
        {
            this.initPanel(new FormDataTableQueryConfig());
        }

        private void accordionControlElement抖音退货一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音退货一览());
        }

        private void accordionControlElement抖音订单明细_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音订单明细());
        }

        private void accordionControlElement未入库成衣总计_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form未入库成衣());
        }

        private void accordionControlElement辅料重构_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form辅料重构());
        }

        private void accordionControlElement审版分活_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form审版分活());
        }

        private void accordionControlElement秒杀下单_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form秒杀商品());
        }

        private void accordionControlElement秒杀发货_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form秒杀未发货());
        }

        private void accordionControlElement秒杀客户_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音客户一览());
        }

        private void accordionControlElement库存查询1_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form库存明细());
        }

        private void accordionControlElement1_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form出入库());
        }

        private void accordionControlElement抖音生产计划_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音生产计划());
        }

        private void accordionControlElementBOM明细一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form款式BOM及在途信息());
        }

        private void accordionControlElement在制品盘点_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form在制品盘点());
            //WBSItemDTO WBSItemDTO = DealXML.XMLFlieToObject<WBSItemDTO>("C:\\Config全\\configVI质检.xml", Encoding.UTF8);
            //this.initPanel(new FormVI质检QC(WBSItemDTO.code, WBSItemDTO.assertNo));
        }

        private void accordionControlElement入库产成品及投产水洗勾稽校验_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form成衣工序扫码情况());
        }

        private void accordionControlElement抖音订单记录_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音客户订单信息());
        }

        private void accordionControlElement订单工序执行_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form订单工序记录());
        }

        private void accordionControlElement有赞spu一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form有赞SKU());
        }

        private void accordionControlElement成衣在制品记录_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form成衣在制品记录());
        }

        private void accordionControlElement有赞SPU及Sku一览_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form有赞Spu及Sku一览());
        }

        private void accordionControlElement抖音直播间看板_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音直播间看板());
        }

        private void accordionControlElement报表_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form报表());
        }

        private void accordionControlElement抖音报表_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音相关报表());
        }

        private void accordionControlElement库存及返回工厂调拨单_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form最新库存());
        }

        private void accordionControlElement抖音用户报表_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音用户报表());
        }

        private void accordionControlElement抖音客户订单_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音客户订单及热销());
        }

        private void accordionControlElement抖音客户信息_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音客户信息());
        }

        private void accordionControlElement抖音有赞商品对照_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form抖音有赞商品对照());
        }

        private void accordionControlElement半成品质检逾期_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form半成品质检逾期());
        }

        private void accordionControlElement2_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form备货对照表());
        }

        private void accordionControlElement有赞发货分拣程序_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form有赞发货分拣程序());
        }

        private void accordionControlElement面料图显示_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form面料图());
        }

        private void accordionControlElement成衣码对照_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form成衣码对照());
        }

        private void accordionControlElement流转码出入库_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form流转码());
        }

        private void accordionControlElement纳可_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form纳客一览());
        }

        private void accordionControlElement新建报表_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form新建报表());
        }
    }
}
